package db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbConn {

    public static Connection getconn(){
        Connection conn = null;
        String user = "root";
        String password = "root";
        String url = "jdbc:Mysql:thin@localhost:3306:ExpressIM";

        try{
            Class.forName("Mysql.jdbc.driver.MysqlDriver");
            conn = DriverManager.getConnection(url,user,password);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return conn;
    }
}
